package com.kaimy.model.constants 
{
	import com.kaimy.model.ConstructDefinition;
	import com.kaimy.model.ConstructType;

	/**
	 * @author jbonfante
	date: Aug 2, 2009
	for: Roundarch Inc.
 
	Document Information:
	Project: KaimysAwesomeFlashProject
	Package: com.kaimy.model.constants.ConstructTypes
	 */
	public class ConstructTypes 
	{
		public static const CONSTRUCT_NAME_OPEN:String ="O";
		public static const CONSTRUCT_NAME_CLOSED:String ="C";
		public static const CONSTRUCT_TYPE_VALNCED:String ="valanced";
		public static const CONSTRUCT_TYPE_NEUTRAL:String ="neutral";
		public static const CONSTRUCT_NAME_ANGRY_OPEN:String ="AN";
		public static const CONSTRUCT_NAME_NEUTRAL_OPEN:String ="CA";
		public static const CONSTRUCT_NAME_NEUTRAL_CLOSED:String ="NE";
		public static const CONSTRUCT_NAME_SAD_CLOSED:String ="SA";
		public static const CONSTRUCT_NAME_HAPPY_CLOSED:String = "HA";
		
		public static function evalDef(type:String) : ConstructDefinition
		{
			var cD:ConstructDefinition;
			switch(type)
			{
				case "AN":
				cD = new ConstructDefinition("Angry_Open", CONSTRUCT_TYPE_VALNCED, CONSTRUCT_NAME_ANGRY_OPEN, CONSTRUCT_NAME_OPEN, "OPEN");
				return cD;
				break;
				
				case "CA":
				cD = new ConstructDefinition("Neutral_Open", CONSTRUCT_TYPE_NEUTRAL, CONSTRUCT_NAME_NEUTRAL_OPEN, CONSTRUCT_NAME_OPEN, "OPEN");
				return cD;
				break;
				
				case "HA":
				cD = new ConstructDefinition("Happy_Closed", CONSTRUCT_TYPE_VALNCED, CONSTRUCT_NAME_HAPPY_CLOSED, CONSTRUCT_NAME_CLOSED, "CLOSED");
				return cD;
				break;
				
				case "NE":
				cD = new ConstructDefinition("Neutral_Closed", CONSTRUCT_TYPE_NEUTRAL, CONSTRUCT_NAME_NEUTRAL_CLOSED, CONSTRUCT_NAME_CLOSED, "CLOSED");
				return cD;
				break;
				
				case "SA":
				cD = new ConstructDefinition("Sad_Closed", CONSTRUCT_TYPE_VALNCED, CONSTRUCT_NAME_SAD_CLOSED, CONSTRUCT_NAME_CLOSED, "CLOSED");
				return cD;
				break;
			}
			return cD;
		}

		public static function evalType(string : String) : ConstructType
		{
			var cT:ConstructType;
			switch(string)
			{
				case "O":
				case "o":
				cT = new ConstructType(CONSTRUCT_NAME_OPEN, "OPEN");
				break;
				
				case "C":
				case "c":
				cT = new ConstructType(CONSTRUCT_NAME_CLOSED, "CLOSED");	
			}
			return cT;
		}
	}
}
